Posting messages to matrix
This commit is contained in:
@@ -38,7 +38,7 @@ class MatrixMessage extends Echomails
|
||||
$echoarea = $notifiable->routeNotificationFor(static::via);
|
||||
$o = $this->setupEchomail($echoarea);
|
||||
|
||||
Log::info(sprintf('%s:+ Sending Matrix Message to [%s]',self::LOGKEY,$echoarea->name));
|
||||
Log::info(sprintf('%s:+ Sending Matrix Message to [%s]',self::LOGKEY,$echoarea->name),['mo'=>$this->mo]);
|
||||
|
||||
$our = our_address($echoarea->domain)->last();
|
||||
$o->to = 'All';
|
||||
@@ -47,9 +47,10 @@ class MatrixMessage extends Echomails
|
||||
$o->subject = $this->mo->topic;
|
||||
$o->fftn_id = $our->id;
|
||||
$o->kludges->put('CHRS:','UTF8 2');
|
||||
$o->kludges->put('EVENT:',$this->mo->event_id);
|
||||
|
||||
// Message
|
||||
$o->msg = $this->mo->message;
|
||||
$o->msg = str_replace("\n","\r",$this->mo->message);
|
||||
$o->set_origin = sprintf('Matrix %s (%s)',$this->mo->room,$our->ftn4d);
|
||||
|
||||
$o->save();
|
||||
|
Reference in New Issue
Block a user